Conversation
310caad to
22b997d
Compare
There was a problem hiding this comment.
Pull request overview
This PR bundles a few small fixes across the trydotnet test helpers, styles, editor dev dependencies, and the microsoft-learn mock interactivity layer.
Changes:
- Renames the loop variable in the multi-editor session factory for consistency/readability.
- Consolidates
.code-container/.code-container-inlinestyling and fixespadding: 01pxto1px. - Hardens
trydotnetUrl/trydotnetOriginURL parameter handling in the microsoft-learn mock to reduce unsafe overrides. - Bumps
chaifrom4.3.6to4.5.0in the trydotnet editor package.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/microsoft-trydotnet/test/sessionFactory.ts | Minor naming consistency in the multi-editor ready-session helper. |
| src/microsoft-trydotnet-styles/sass/trydotnet.scss | Deduplicates code container styles and fixes invalid-looking padding value. |
| src/microsoft-trydotnet-editor/package.json | Updates chai devDependency version. |
| src/microsoft-learn-mock/src/interactivity/originalCode.ts | Adds validation for URL query params to avoid unsafe origins/URLs. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Validate the trydotnetUrl query parameter to only allow relative paths starting with '/' (but not '//') to prevent injection of arbitrary script URLs (e.g., https://evil.com/malware.js, javascript:, data:). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Fix client-side URL redirect vulnerability in getUrls() Validate trydotnetOrigin query parameter to prevent postMessage redirection to malicious origins. Only allow HTTPS origins under *.microsoft.com domain. Invalid or non-matching origins fall back to the default https://trydotnet.microsoft.com. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Bump chai, fix SCSS quality issues, fix naming inconsistency - Bump chai from 4.3.6 to 4.5.0 in microsoft-trydotnet-editor - Fix leading zero in padding (01px -> 1px) in trydotnet.scss - Consolidate duplicate .code-container and .code-container-inline rules - Fix editorIframe -> editorIFrame casing in test/sessionFactory.ts
22b997d to
1bb7286
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.